package picasa;

import java.awt.Frame;

public class ColorAlg extends Frame implements ColorInterface {
	
	  public int[][][] processImg(int[][][] threeDPix, int imgRows,int imgCols, int red, int blue, int green){


		    int[][][] temp3D = threeDPix;

		   
		    for(int row = 0;row < imgRows;row++){

		      for(int col = 0;col < imgCols;col++){


		          temp3D[row][col][1] = 

		              temp3D[row][col][1] * red/100;

		          temp3D[row][col][2] = 

		            temp3D[row][col][2] * green/100;

		          temp3D[row][col][3] = 

		             temp3D[row][col][3] * blue/100;

		      }//end inner loop

		    }//end outer loop

		    //Return the modified array of image data.

		    return temp3D;

		  }//end processImg

}
